package com.hospital.hospitalserver.mapper;

import com.hospital.hospitalserver.entity.PatientMasterDTO;
import com.hospital.hospitalserver.entity.Vo.PatientMaster;
import com.hospital.hospitalserver.entity.Vo.PatientMasterAndDiagnosisRecordVO;
import com.hospital.hospitalserver.entity.query.DoctorDiagnosisRecordAndPatientMasterQuery;
import com.hospital.hospitalserver.entity.query.DoctorPatientMasterQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 患者档案相关方法
 * */
@Mapper
public interface PatientMasterMapper {
    /**
     * 查询患者档案信息
     * 判断患者档案是否存在
     * */
    PatientMaster getPatientMasterDataByIdNumber(@Param("id_number") String id_number);

    /**
     * 新建患者档案
     * */
    Integer insert(PatientMasterDTO dto);

    /**
     * 编辑患者档案
     * */
    Integer edit(PatientMasterDTO dto);

    /**
     * 医生工作台端
     * 加载患者档案数据分页数据总数
     * */
    Integer getPatientMasterDataCountByDoctorId(DoctorPatientMasterQuery query);


    /**
     * 医生工作台端
     * 加载患者档案数据分页
     * */
    List<PatientMaster> getPatientMasterMapperDataByDoctorId(DoctorPatientMasterQuery query);

    /**
     * 医生工作台
     * 根据患者档案id查询患者基础信息
     * */
    PatientMasterAndDiagnosisRecordVO getPatientMasterAndRecordListDataById(DoctorDiagnosisRecordAndPatientMasterQuery query);

}
